/*
 * Copyright (c) 2007 Compl Yue Still, All Rights Reserved.
 */

package oex.tasks
{
	import hbi.domain.Gateway;
	import hbi.task.TaskAgent;
	
	import oex.ObjectExplorer;
	import oex.ui.ObjectShape;

	public class ShapeRelease implements TaskAgent
	{
		
		private var explorer:ObjectExplorer;
		
		public function arrived(gateway:Gateway):void
		{
			explorer = ObjectExplorer(gateway.localDomain);
		}
		
		public function shapeRemoved(oid:int):void
		{
			explorer.shapeRemoved(oid);
		}

		private var _shape:ObjectShape = null;
		
		public function withShape(type:String, oid:int):void
		{
			_shape = explorer.prepareShape(oid, type);
		}
		
		public function updatedShapeProperty(name:String, value:*):void
		{
			_shape[name] = value;
		}
		
		public function finishTask(gateway:Gateway):void
		{
		}
		
	}
}
